import { exSwitch } from '@ve/common/components/extension'

export default {
  VERSION: '20220624',
  type: 'uiCode',
  name: '代码块',
  icon: 'bar-chart-fill',
  //扩展
  extension: {
    requestSet: {
      type: 'exRequestSet',
      name: '接口配置',
      value: {
        api: '/wms/wms-web',
        method: 'wms.screen.query.test',
        getDataKey: 'wms.screen.query.test',
        loopRequest: false,
        loopTime: 3000,
        nameKey: '',
        valueKey: '',
        busList: [],
        dataObj: {},
        isJson: false,
        data: [
          { key: '#LIMIT#', value: '1' },
          { key: '#PAGE_SIZE#', value: '10' },
        ],
        resList: [],
      },
    },
    firstGetData: exSwitch('首次获取数据', true),
    codeDesign: {
      type: 'exCodeDesign',
      name: '代码配置',
      value: `option = {
        xAxis: {
          type: 'category',
          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
          type: 'value'
        },
        series: [
          {
            data: [150, 230, 224, 218, 135, 147, 260],
            type: 'line'
          }
        ]
      };`,
    },
  },
  //交互
  interaction: [],
  //条件、逻辑指令
  logicInstruction: [],
  data: {
    formData: {},
  },
}
